***********************************************************************************************
***
***	INTERTEMPORAL EVIDENCE ON THE STRATEGY OF POPULISM IN THE US (Gennaro, Lecce, Morelli)
***	Replication Package
***  
*** Appendix - Table A14-A15
***
***********************************************************************************************



clear
est clear 

* Indicate location of the replication package here
cd "/Replication Package"


**********************************************
***** A15 
**********************************************


use "3_data/for_analysis/congress_election_corrupt.dta",clear

keep if uncont==0 & indep==0
global controls "female i.age_cat_num i.ethnicity2 i.educ_cat len_words i.election_year"

eststo m1: areg pop_dim2_s outsider_correct $controls , a(state) cluster(district)

eststo m2: areg pop_dim2_s i.outsider_correct##c.delta_ebma_st $controls , a(state) cluster(district)

eststo m3: areg pop_dim2_s i.outsider_correct##i.competitivedistricts##c.delta_ebma_st $controls , a(state) cluster(district)



use "3_data/for_analysis/congress_election_doright.dta",clear

keep if uncont==0 & indep==0
global controls "female i.age_cat_num i.ethnicity2 i.educ_cat len_words i.election_year"

eststo m4: areg pop_dim2_s i.outsider_correct##c.delta_ebma_st $controls , a(state) cluster(district)

eststo m5: areg pop_dim2_s i.outsider_correct##i.competitivedistricts##c.delta_ebma_st $controls , a(state) cluster(district)



use "3_data/for_analysis/congress_election_benefit.dta", clear

keep if uncont==0 & indep==0
global controls "female i.age_cat_num i.ethnicity2 i.educ_cat len_words i.election_year"

eststo m6: areg pop_dim2_s i.outsider_correct##c.delta_ebma_st $controls , a(state) cluster(district)

eststo m7: areg pop_dim2_s i.outsider_correct##i.competitivedistricts##c.delta_ebma_st $controls , a(state) cluster(district)


esttab m1 m2 m3 m4 m5 m6 m7  using "4_results/tables/tabA15.tex", f label replace booktabs alignment(D{.}{.}{-1}) ///
s(N r2, fmt(0 2) label("Observations" "R-squared")) ///
nomtitles star(* 0.10 ** 0.05 *** 0.01) r2 b(3) se(3) brac nonotes


*******************************************
***** A14
*******************************************

clear
est clear


use "3_data/for_analysis/congress_election_corrupt.dta",clear
keep if uncont==0 & indep==0

eststo m1: reg delta_ebma_st econ , cluster(district)

eststo m2: areg delta_ebma_st econ, a(state) cluster(district)

eststo m3: areg delta_ebma_st econ, a(election_year) cluster(district)


use "3_data/for_analysis/congress_election_doright.dta",clear
keep if uncont==0 & indep==0

eststo m4: reg delta_ebma_st econ , cluster(district)

eststo m5: areg delta_ebma_st econ, a(state) cluster(district)

eststo m6: areg delta_ebma_st econ, a(election_year) cluster(district)



use "3_data/for_analysis/congress_election_benefit.dta", clear

keep if uncont==0 & indep==0

eststo m7: reg delta_ebma_st econ , cluster(district)

eststo m8: areg delta_ebma_st econ, a(state ) cluster(district)

eststo m9: areg delta_ebma_st econ, a(election_year ) cluster(district)


esttab m1 m2 m3 m4 m5 m6 m7 m8 m9  using "4_results/tables/tabA14.tex", f label replace booktabs alignment(D{.}{.}{-1}) ///
s(N r2, fmt(0 2) label("Observations" "R-squared")) ///
nomtitles star(* 0.10 ** 0.05 *** 0.01) r2 b(3) se(3) brac nonotes



